﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Qurihara.OSCCom
{
    public interface IComCore
    {
        //string Prefix
        //{
        //    get;
        //}
        string Name
        {
            get;
            set;
        }
        string Ip
        {
            get;
        }
        int MPort
        {
            get;
        }
        void Initialize();
        void Dispose();
        void ConnectTransmitter(string serverIP, int serverPort);

        //void Send(string adr, string val);
        void Send(string senderName, string destName, string adr, string val);

        event MessageEventHandler MessageReceived;

        bool IsConnected
        {
            get;
        }

    }
    public delegate void MessageEventHandler(object o, MessageEventArgs e);
    public class MessageEventArgs : EventArgs
    {
        public MessageEventArgs(DateTime timeStamp, string senderName,string destName, string adr, string data)
        {
            TimeStamp = timeStamp;
            SenderName = senderName;
            DestName = destName;
            Adr = adr;
            Data = data;
        }
        public DateTime TimeStamp;
        public string SenderName;
        public string DestName;
        public string Adr;
        public string Data;
    }
}
